﻿#define _CRT_SECURE_NO_WARNINGS//有序序列插入一个数
#include<stdio.h>
#include<string.h>
int main()
{
	int n = 0;
	int tmp = 0;
	scanf("%d", &n);
	int arr[51] = { 0 };
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &arr[i]);
	}
	scanf("%d", &arr[n]);
	for (int i = 0; i < n + 1 - 1; i++)
	{
		for (int j = 0; j < n + 1 - 1 - i; j++)
		{
			if (arr[j] > arr[j + 1])
			{
				tmp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = tmp;
			}
		}
	}
	for (int i = 0; i < n + 1; i++)
	{
		printf("%d ", arr[i]);
	}


	return 0;
}